<template>
  <su-popup
    :show="show"
    type="bottom"
    round="20"
    @close="emits('close')"
    showClose
    backgroundColor="#000"
  >
    <view class="model-box">
      <view class="title   ss-flex ss-row-center">实付金额（积分）</view>
      <view class="number">499888  </view>
      <view class="time">剩余支付时间：00:02:50    </view>

      <view class="form">
        <view class="balance  ss-flex ss-col-center ss-row-between">
          <view class="balance-l ss-flex">
            <image class="balance-1" src="@/static/img/payMethod-1.png"></image>
            <view>余额支付</view>
          </view>
          <view class="balance-r">
            可用：￥200000
          </view>
        </view>
      </view>
    </view>
    <view class="modal-footer ss-flex">
      <button class="confirm-btn " @tap="onConfirm">立即支付</button>
    </view>
  </su-popup>
</template>
<script setup>
  import { computed, reactive, ref, unref } from 'vue';
  import { code } from '@/sheep/validate/form';

  const props = defineProps({
    modelValue: {
      type: Object,
      default() {
      },
    },
    show: {
      type: Boolean,
      default: true,
    },
  });
  const emits = defineEmits(['confirm', 'close']);
  const state = reactive({
    couponInfo: computed(() => props.modelValue),
    couponId: 0,
    model: {
      password: '', // 密码
    },
    rules: {
      code,
    },
  });
  const payRef = ref(null);

  function radioChange(couponId) {
    if (state.couponId == couponId) {
      state.couponId = 0;
    } else {
      state.couponId = couponId;
    }
  }

  const onConfirm = async () => {

    emits('confirm', state.couponId);
  };
</script>
<style lang="scss" scoped>
  :deep() {
    .uni-checkbox-input {
      background-color: var(--ui-BG-Main);
    }
    .uni-forms-item{
      padding: 0 15px ;
      box-sizing: border-box;
      height: 50px;
    }
    .uni-forms-item__label{
      .label-text{

      font-weight: 400;
      font-size: 15px;
      color: #FFFFFF
      }
      height: 100%;
    }
  .uni-forms-item__box,.uni-forms-item__inner,.uni-easyinput,.uni-easyinput__content{
      height: 100%;
    }
    .uni-forms-item__inner{
      padding-bottom: 5px;
    }
    .uni-input-input{
      color: #fff;
    }
  }

  .model-box {
  }

  .title {
    margin-top: 16px;
    height: 80rpx;
    font-weight: 400;
    font-size: 16px;
    color: #A6A6A6;
  }
  .number{
    font-weight: 500;
    font-size: 36px;
    line-height: 36px;
    color: #F5F6F8;
    padding: 20px 0 20px;
    text-align: center;
  }
  .time{
    font-weight: 300;
    font-size: 12px;
    color: #868686;
    text-align: center;
    margin-bottom: 27px;
  }
  .form{
    width: 345px;
    background: #1E1E1E;
    border-radius: 10px;
    box-sizing: border-box;
    margin: 0 auto;
    .balance{
      padding: 18px 15px ;
      box-sizing: border-box;
      .balance-l{
        .balance-1{
          width: 15px;
          height: 15px;
          margin-right: 8px;
        }
        font-weight: 400;
        font-size: 15px;
        color: #FFFFFF;
      }
      .balance-r{
        font-weight: 400;
        font-size: 15px;
        color: #FFFFFF;
      }
    }
    .ss-reset-button{
      color: #00A1FF;
    }

  }

  .subtitle {
    font-size: 26rpx;
    font-weight: 500;
    color: #333333;
  }

  .model-content {
    height: 54vh;
  }

  .modal-footer {
    width: 100%;
    padding: 16px 15px;
    box-sizing: border-box;
  }

  .confirm-btn {
    width: 100%;
    height: 50px;
    line-height: 50px;
    font-weight: 500;
    font-size: 16px;
    color: #090909;
    background: linear-gradient(90deg, #45C9F0, #36F6AF);
    border-radius: 25px;
  }

</style>
